package br.cnpq.webflowah.gui;

import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Frame;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.io.File;
import java.util.ArrayList;
import java.util.List;

import javax.swing.ButtonGroup;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.ListModel;
import javax.swing.WindowConstants;
import javax.swing.JButton;
import javax.swing.SwingConstants;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JRadioButton;
import javax.swing.BoxLayout;
import javax.swing.BorderFactory;
import javax.swing.JTextField;
import javax.swing.JScrollPane;
import javax.swing.JList;
import javax.swing.JTextArea;

import br.cnpq.webflowah.ontologia.DocumentoOWLS;
import javax.swing.JSeparator;

public class TelaImportarOWLS extends JDialog {

	private static final long serialVersionUID = 1L;

	private JPanel jContentPane = null;

	private JPanel jToolBarPane = null;

	private JButton voltarButton = null;

	private JButton avancarButton = null;

	private JButton encerrarButton = null;

	private JButton cancelarButton = null;

	private JPanel jCenterPane = null;

	private List<JPanel> listPanels = null;
	
	private int currentPanel = 0;
	
	private JPanel jPanel1 = null;

	private JPanel jPanel2 = null;

	private JPanel jPanel3 = null;

	private JPanel jPanel4 = null;

	private JLabel jLabel1 = null;

	private JRadioButton jRadioButton1 = null;

	private JRadioButton jRadioButton2 = null;
	
	private ButtonGroup radioGroup = null;  //  @jve:decl-index=0:

	private JPanel jRadioPane = null;

	private JLabel jLabel2 = null;

	private JTextField jTextField2 = null;

	private JButton fileButton = null;

	private JLabel jLabel31 = null;

	private JScrollPane jScrollPane33 = null;

	private JList jList33 = null;

	private JLabel jLabel4 = null;

	private JScrollPane jScrollPane4 = null;

	private JList jList4 = null;
		
	private DocumentoOWLS doc = null;
	
	private JScrollPane jScrollPane34 = null;

	private JList jList34 = null;

	private JLabel jLabel33 = null;

	private JLabel jLabel34 = null;

	private JLabel jLabel32 = null;

	private JTextArea jTextArea32 = null;

	private JScrollPane jScrollPane32 = null;

	private JScrollPane jScrollPane31 = null;

	private JList jList31 = null;
	
	private int opcao = 0;

	private JLabel jLabel331 = null;

	private JLabel jLabel341 = null;

	private JScrollPane jScrollPane331 = null;

	private JList jList331 = null;

	private JScrollPane jScrollPane341 = null;

	private JList jList341 = null;

	private JSeparator jSeparator = null;
	
	private TelaImportarOWLS(Frame owner) {
		super(owner, "Importar OWL-S", true);
		initialize();
	}
		
	public static ListModel obterServicos(JDialog parent) {
		TelaImportarOWLS tela = new TelaImportarOWLS((Frame) parent.getOwner());
		tela.setVisible(true);
		return (tela.opcao == JOptionPane.OK_OPTION) ? tela.jList4.getModel() : null;  
	}
		
	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(500, 400);
		this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		this.setContentPane(getJContentPane());
		this.setLocationRelativeTo(null);
		
		this.listPanels = new ArrayList<JPanel>();
		this.listPanels.add(getJPanel1());
		this.listPanels.add(getJPanel2());
		this.listPanels.add(getJPanel3());		
		this.listPanels.add(getJPanel4());
		
		this.radioGroup = new ButtonGroup();
		this.radioGroup.add(getJRadioButton1());
		this.radioGroup.add(getJRadioButton2());
		
		getJRadioButton1().setSelected(true);
	}
	
	private void populateJList31() {
		getJList31().setListData(new Object[] {});
		try {
			doc = DocumentoOWLS.obterOntologia(getJTextField2().getText(),
					getJRadioButton2().isSelected());
			
			List list = doc.getServices();			

			if (list != null) {
				getJList31().setListData(list.toArray());
				getJList31().setSelectedIndex(0);
			}
		} catch (Exception e) {
			e.printStackTrace();
			JOptionPane.showMessageDialog(TelaImportarOWLS.this, e.getMessage(),
					"Mensagem", JOptionPane.ERROR_MESSAGE);
		}		
	}
			
	public void changePanel(int i) {
		int oldPanel = currentPanel;
		int newPanel = currentPanel + i;
		
		// Popular JList31
		if (oldPanel == 1 && newPanel == 2) {
			populateJList31();
		}

		// Popular JList4
		if (oldPanel == 2 && newPanel == 3) {
			getJList4().setListData(getJList31().getSelectedValues());
		}

		avancarButton.setEnabled(newPanel < listPanels.size()-1);
		voltarButton.setEnabled(newPanel > 0);
		encerrarButton.setEnabled(newPanel == listPanels.size()-1);
				
		listPanels.get(oldPanel).setVisible(false);
		listPanels.get(newPanel).setVisible(true);
		
		currentPanel = newPanel;
	}

	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jContentPane = new JPanel();
			jContentPane.setLayout(new BorderLayout());
			jContentPane.add(getJToolBarPane(), BorderLayout.SOUTH);
			jContentPane.add(getJCenterPane(), BorderLayout.CENTER);
		}
		return jContentPane;
	}

	/**
	 * This method initializes jToolBarPane	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJToolBarPane() {
		if (jToolBarPane == null) {
			FlowLayout flowLayout = new FlowLayout();
			flowLayout.setAlignment(FlowLayout.RIGHT);
			jToolBarPane = new JPanel();
			jToolBarPane.setLayout(flowLayout);
			jToolBarPane.setPreferredSize(new Dimension(338, 41));
			jToolBarPane.add(getVoltarButton());
			jToolBarPane.add(getAvancarButton());
			jToolBarPane.add(getEncerrarButton());
			jToolBarPane.add(getCancelarButton());
		}
		return jToolBarPane;
	}

	/**
	 * This method initializes voltarButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getVoltarButton() {
		if (voltarButton == null) {
			voltarButton = new JButton();
			voltarButton.setText("< Back");
			voltarButton.setEnabled(false);
			voltarButton.setPreferredSize(new Dimension(91, 26));
			voltarButton.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					changePanel(-1);
				}
			});
		}
		return voltarButton;
	}

	/**
	 * This method initializes avancarButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getAvancarButton() {
		if (avancarButton == null) {
			avancarButton = new JButton();
			avancarButton.setText("Next >");
			avancarButton.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					changePanel(1);
				}
			});
		}
		return avancarButton;
	}

	/**
	 * This method initializes encerrarButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getEncerrarButton() {
		if (encerrarButton == null) {
			encerrarButton = new JButton();
			encerrarButton.setText("Finish");
			encerrarButton.setEnabled(false);
			encerrarButton.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					try {
						DocumentoOWLS.salvarOntologia(doc);
						opcao = JOptionPane.OK_OPTION;
						dispose();
					} catch (Exception ex) {
						ex.printStackTrace();
						JOptionPane.showMessageDialog(TelaImportarOWLS.this, ex.getMessage(),
								"Mensagem", JOptionPane.ERROR_MESSAGE);
					}
				}
			});
		}
		return encerrarButton;
	}

	/**
	 * This method initializes cancelarButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getCancelarButton() {
		if (cancelarButton == null) {
			cancelarButton = new JButton();
			cancelarButton.setText("Cancel");
			cancelarButton.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					opcao = JOptionPane.CANCEL_OPTION;
					dispose();
				}
			});
		}
		return cancelarButton;
	}

	/**
	 * This method initializes jCenterPane	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJCenterPane() {
		if (jCenterPane == null) {
			jCenterPane = new JPanel();
			jCenterPane.setLayout(new CardLayout());
			jCenterPane.add(getJPanel1(), getJPanel1().getName());
			jCenterPane.add(getJPanel2(), getJPanel2().getName());
			jCenterPane.add(getJPanel3(), getJPanel3().getName());
			jCenterPane.add(getJPanel4(), getJPanel4().getName());
		}
		return jCenterPane;
	}
	
	private JLabel getJLabel1() {
		if (jLabel1 == null) {
			jLabel1 = new JLabel();
			jLabel1.setText(" Choose how to obtain the document OWL-S:");
			jLabel1.setVerticalAlignment(SwingConstants.BOTTOM);
			jLabel1.setPreferredSize(new Dimension(380, 26));			
		}
		return jLabel1;
	}

	/**
	 * This method initializes jPanel1	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel1() {
		if (jPanel1 == null) {
			FlowLayout flowLayout1 = new FlowLayout();
			flowLayout1.setAlignment(FlowLayout.LEFT);
			flowLayout1.setHgap(10);
			flowLayout1.setVgap(5);
			jPanel1 = new JPanel();
			jPanel1.setName("jPanel1");
			jPanel1.setLayout(flowLayout1);
			jPanel1.setVisible(true);
			jPanel1.add(getJLabel1());
			jPanel1.add(getJRadioPane());
		}
		return jPanel1;
	}

	private JLabel getJLabel2() {
		if (jLabel2 == null) {
			jLabel2 = new JLabel();
			jLabel2.setText("");
			jLabel2.setVerticalTextPosition(SwingConstants.CENTER);
			jLabel2.setVerticalAlignment(SwingConstants.BOTTOM);
			jLabel2.setPreferredSize(new Dimension(435, 26));
		}
		return jLabel2;
	}
	
	/**
	 * This method initializes jPanel2	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel2() {
		if (jPanel2 == null) {
			FlowLayout flowLayout2 = new FlowLayout();
			flowLayout2.setAlignment(FlowLayout.LEFT);
			flowLayout2.setHgap(10);
			jPanel2 = new JPanel();
			jPanel2.setLayout(flowLayout2);
			jPanel2.setVisible(false);
			jPanel2.setName("jPanel2");
			jPanel2.add(getJLabel2());
			jPanel2.add(getFileButton());
			jPanel2.add(getJTextField2());
		}
		return jPanel2;
	}

	private JLabel getJLabel31() {
		if (jLabel31 == null) {
			jLabel31 = new JLabel();
			jLabel31.setText(" Select one or more services defined in the ontology");
			jLabel31.setVerticalAlignment(SwingConstants.BOTTOM);
			jLabel31.setPreferredSize(new Dimension(380, 26));			
		}
		return jLabel31;
	}
	
	private JLabel getJLabel4() {
		if (jLabel4 == null) {
			jLabel4 = new JLabel();
			jLabel4.setText(" The following services will be added");
			jLabel4.setVerticalAlignment(SwingConstants.BOTTOM);
			jLabel4.setPreferredSize(new Dimension(380, 26));			
		}
		return jLabel4;
	}
	
	private JLabel getJLabel32() {
		if (jLabel32 == null) {
			jLabel32 = new JLabel();
			jLabel32.setText(" Description of Service");
			jLabel32.setVerticalAlignment(SwingConstants.BOTTOM);
			jLabel32.setPreferredSize(new Dimension(380, 16));
		}
		return jLabel32;
	}
	
	private JLabel getJLabel33() {
		if (jLabel33 == null) {
			jLabel33 = new JLabel();
			jLabel33.setText(" Input Parameters");
			jLabel33.setVerticalAlignment(SwingConstants.BOTTOM);
			jLabel33.setPreferredSize(new Dimension(231, 16));			
		}
		return jLabel33;
	}
	
	private JLabel getJLabel34() {
		if (jLabel34 == null) {
			jLabel34 = new JLabel();
			jLabel34.setText(" Output Parameters");
			jLabel34.setVerticalAlignment(SwingConstants.BOTTOM);
			jLabel34.setPreferredSize(new Dimension(231, 16));			
		}
		return jLabel34;
	}
	
	/**
	 * This method initializes jPanel3	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel3() {
		if (jPanel3 == null) {
			jLabel341 = new JLabel();
			jLabel341.setPreferredSize(new Dimension(231, 16));
			jLabel341.setVerticalAlignment(SwingConstants.BOTTOM);
			jLabel341.setText("Effect");
			jLabel331 = new JLabel();
			jLabel331.setPreferredSize(new Dimension(231, 16));
			jLabel331.setVerticalAlignment(SwingConstants.BOTTOM);
			jLabel331.setText("Precondition");
			FlowLayout flowLayout3 = new FlowLayout();
			flowLayout3.setAlignment(FlowLayout.LEFT);
			flowLayout3.setHgap(10);
			jPanel3 = new JPanel();
			jPanel3.setLayout(flowLayout3);
			jPanel3.setName("jPanel3");
			jPanel3.setVisible(false);
			jPanel3.add(getJLabel31());
			jPanel3.add(getJScrollPane31(), null);
			jPanel3.add(getJSeparator(), null);
			jPanel3.add(getJLabel32());
			jPanel3.add(getJScrollPane32());
			jPanel3.add(getJLabel33());
			jPanel3.add(getJLabel34());
			jPanel3.add(getJScrollPane33());
			jPanel3.add(getJScrollPane34());
			jPanel3.add(jLabel331, null);
			jPanel3.add(jLabel341, null);
			jPanel3.add(getJScrollPane331(), null);
			jPanel3.add(getJScrollPane341(), null);
		}
		return jPanel3;
	}

	/**
	 * This method initializes jPanel4	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel4() {
		if (jPanel4 == null) {
			FlowLayout flowLayout4 = new FlowLayout();
			flowLayout4.setAlignment(FlowLayout.LEFT);
			flowLayout4.setHgap(10);
			jPanel4 = new JPanel();
			jPanel4.setLayout(flowLayout4);
			jPanel4.setName("jPanel4");
			jPanel4.setVisible(false);
			jPanel4.add(getJLabel4());
			jPanel4.add(getJScrollPane4());
		}
		return jPanel4;
	}

	/**
	 * This method initializes webRadioButton	
	 * 	
	 * @return javax.swing.JRadioButton	
	 */
	private JRadioButton getJRadioButton1() {
		if (jRadioButton1 == null) {
			jRadioButton1 = new JRadioButton();
			jRadioButton1.setText("Import an ontology from a URL");
			jRadioButton1.addItemListener(new java.awt.event.ItemListener() {
				public void itemStateChanged(java.awt.event.ItemEvent e) {
					if (jRadioButton1.isSelected()) {
						jLabel2.setText(" Enter from the URL http://");
						jTextField2.setText("");
						fileButton.setVisible(false);
					} else {
						jLabel2.setText(" Enter with the path of file");
						jTextField2.setText("");
						fileButton.setVisible(true);
					}
				}
			});
		}
		return jRadioButton1;
	}

	/**
	 * This method initializes arquivoRadioButton	
	 * 	
	 * @return javax.swing.JRadioButton	
	 */
	private JRadioButton getJRadioButton2() {
		if (jRadioButton2 == null) {
			jRadioButton2 = new JRadioButton();
			jRadioButton2.setText("Import an ontology from a file");
		}
		return jRadioButton2;
	}

	/**
	 * This method initializes jRadioPane	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJRadioPane() {
		if (jRadioPane == null) {
			jRadioPane = new JPanel();
			jRadioPane.setLayout(new BoxLayout(getJRadioPane(), BoxLayout.Y_AXIS));
			jRadioPane.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 5));
			jRadioPane.setPreferredSize(new Dimension(380, 50));
			jRadioPane.add(getJRadioButton1());
			jRadioPane.add(getJRadioButton2());
		}
		return jRadioPane;
	}

	/**
	 * This method initializes jTextField2	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField2() {
		if (jTextField2 == null) {
			jTextField2 = new JTextField();
			jTextField2.setPreferredSize(new Dimension(472, 20));
		}
		return jTextField2;
	}

	/**
	 * This method initializes fileButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getFileButton() {
		if (fileButton == null) {
			fileButton = new JButton();
			fileButton.setPreferredSize(new Dimension(26, 26));
			fileButton.setToolTipText("Search");
			fileButton.setText("...");
			fileButton.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					JFileChooser chooser = new JFileChooser("./owl-s/");
					chooser.addChoosableFileFilter(new javax.swing.filechooser.FileFilter() {
				        public boolean accept(File file) {
			        	    if (file.isDirectory()) return true;
				            String filename = file.getName();
				            return filename.endsWith(".owl");
				        }
				        public String getDescription() {
				            return "*.owl";
				        }
					});
					int opt = chooser.showOpenDialog(TelaImportarOWLS.this);
					if (opt == JFileChooser.APPROVE_OPTION)
						jTextField2.setText(chooser.getSelectedFile().getAbsolutePath());
				}
			});
		}
		return fileButton;
	}

	/**
	 * This method initializes jScrollPane33	
	 * 	
	 * @return javax.swing.JScrollPane	
	 */
	private JScrollPane getJScrollPane33() {
		if (jScrollPane33 == null) {
			jScrollPane33 = new JScrollPane();
			jScrollPane33.setPreferredSize(new Dimension(232, 50));
			jScrollPane33.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
			jScrollPane33.setViewportView(getJList33());
		}
		return jScrollPane33;
	}

	/**
	 * This method initializes jList33	
	 * 	
	 * @return javax.swing.JList	
	 */
	private JList getJList33() {
		if (jList33 == null) {
			jList33 = new JList();
			jList33.setBackground(new Color(238, 238, 238));
		}
		return jList33;
	}

	/**
	 * This method initializes jScrollPane4	
	 * 	
	 * @return javax.swing.JScrollPane	
	 */
	private JScrollPane getJScrollPane4() {
		if (jScrollPane4 == null) {
			jScrollPane4 = new JScrollPane();
			jScrollPane4.setPreferredSize(new Dimension(473, 287));
			jScrollPane4.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
			jScrollPane4.setViewportView(getJList4());
		}
		return jScrollPane4;
	}

	/**
	 * This method initializes jList4	
	 * 	
	 * @return javax.swing.JList	
	 */
	private JList getJList4() {
		if (jList4 == null) {
			jList4 = new JList();
			jList4.setBackground(new Color(238, 238, 238));
		}
		return jList4;
	}

	/**
	 * This method initializes jScrollPane34	
	 * 	
	 * @return javax.swing.JScrollPane	
	 */
	private JScrollPane getJScrollPane34() {
		if (jScrollPane34 == null) {
			jScrollPane34 = new JScrollPane();
			jScrollPane34.setPreferredSize(new Dimension(231, 50));
			jScrollPane34.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
			jScrollPane34.setViewportView(getJList34());
		}
		return jScrollPane34;
	}

	/**
	 * This method initializes jList34	
	 * 	
	 * @return javax.swing.JList	
	 */
	private JList getJList34() {
		if (jList34 == null) {
			jList34 = new JList();
			jList34.setBackground(new Color(238, 238, 238));
		}
		return jList34;
	}

	/**
	 * This method initializes jTextArea32	
	 * 	
	 * @return javax.swing.JTextArea	
	 */
	private JTextArea getJTextArea32() {
		if (jTextArea32 == null) {
			jTextArea32 = new JTextArea();
			jTextArea32.setLineWrap(true);
			jTextArea32.setWrapStyleWord(true);
			jTextArea32.setEditable(false);
			jTextArea32.setBackground(new Color(238, 238, 238));
			jTextArea32.setFont(new Font("Dialog", Font.BOLD, 12));
		}
		return jTextArea32;
	}

	/**
	 * This method initializes jScrollPane32	
	 * 	
	 * @return javax.swing.JScrollPane	
	 */
	private JScrollPane getJScrollPane32() {
		if (jScrollPane32 == null) {
			jScrollPane32 = new JScrollPane();
			jScrollPane32.setPreferredSize(new Dimension(473, 50));
			jScrollPane32.setViewportView(getJTextArea32());
		}
		return jScrollPane32;
	}

	/**
	 * This method initializes jScrollPane31	
	 * 	
	 * @return javax.swing.JScrollPane	
	 */
	private JScrollPane getJScrollPane31() {
		if (jScrollPane31 == null) {
			jScrollPane31 = new JScrollPane();
			jScrollPane31.setPreferredSize(new Dimension(473, 50));
			jScrollPane31.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
			jScrollPane31.setViewportView(getJList31());
		}
		return jScrollPane31;
	}

	/**
	 * This method initializes jList31	
	 * 	
	 * @return javax.swing.JList	
	 */
	private JList getJList31() {
		if (jList31 == null) {
			jList31 = new JList();
			jList31.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
				public void valueChanged(javax.swing.event.ListSelectionEvent e) {
					if (jList31.getSelectedValue() != null) {
						jTextArea32.setText(doc.getDescription(jList31.getSelectedValue()));
						jList33.setListData(doc.getInputs(jList31.getSelectedValue()).toArray());
						jList34.setListData(doc.getOutputs(jList31.getSelectedValue()).toArray());
						jList331.setListData(doc.getPreConditions(jList31.getSelectedValue()).toArray());						
						jList341.setListData(doc.getEffects(jList31.getSelectedValue()).toArray());
					} else {
						jTextArea32.setText("");
						jList33.setListData(new Object[] {});
						jList34.setListData(new Object[] {});						
						jList331.setListData(new Object[] {});
						jList341.setListData(new Object[] {});						
					}
				}
			});
		}
		return jList31;
	}

	/**
	 * This method initializes jScrollPane331	
	 * 	
	 * @return javax.swing.JScrollPane	
	 */
	private JScrollPane getJScrollPane331() {
		if (jScrollPane331 == null) {
			jScrollPane331 = new JScrollPane();
			jScrollPane331.setPreferredSize(new Dimension(232, 50));
			jScrollPane331.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
			jScrollPane331.setViewportView(getJList331());
		}
		return jScrollPane331;
	}

	/**
	 * This method initializes jList331	
	 * 	
	 * @return javax.swing.JList	
	 */
	private JList getJList331() {
		if (jList331 == null) {
			jList331 = new JList();
			jList331.setBackground(new Color(238, 238, 238));
		}
		return jList331;
	}

	/**
	 * This method initializes jScrollPane341	
	 * 	
	 * @return javax.swing.JScrollPane	
	 */
	private JScrollPane getJScrollPane341() {
		if (jScrollPane341 == null) {
			jScrollPane341 = new JScrollPane();
			jScrollPane341.setPreferredSize(new Dimension(231, 50));
			jScrollPane341.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
			jScrollPane341.setViewportView(getJList341());
		}
		return jScrollPane341;
	}

	/**
	 * This method initializes jList341	
	 * 	
	 * @return javax.swing.JList	
	 */
	private JList getJList341() {
		if (jList341 == null) {
			jList341 = new JList();
			jList341.setBackground(new Color(238, 238, 238));
		}
		return jList341;
	}

	/**
	 * This method initializes jSeparator	
	 * 	
	 * @return javax.swing.JSeparator	
	 */
	private JSeparator getJSeparator() {
		if (jSeparator == null) {
			jSeparator = new JSeparator(JSeparator.HORIZONTAL);
			jSeparator.setOrientation(SwingConstants.HORIZONTAL);
			jSeparator.setPreferredSize(new Dimension(473, 2));
		}
		return jSeparator;
	}

}
